<%@ page language="java" pageEncoding="UTF-8" %>
<%@ include file="../portal_common/taglibs.jsp" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
    <title>商家入驻申请</title>
    <link rel="stylesheet" type="text/css" href="${ctx}/css/webbase.css"/>
    <link rel="stylesheet" type="text/css" href="${ctx}/css/pages-register.css"/>
</head>

<body>
<div class="register py-container ">
    <!--head-->
    <div class="logoArea">
        <a href="${ctx}/index" class="logo" style="background-position: 10px 10px;"></a>
    </div>
    <!--register-->
    <div class="registerArea">
        <h3>商家入驻申请<span class="go">我有账号，去<a href="http://localhost:8080/admin/login.html" target="_blank">登陆</a></span></h3>
        <div class="info">
            <form class="sui-form form-horizontal" id="settelForm">

                <div class="control-group">
                    <label class="control-label">登陆名（不可修改）：</label>
                    <div class="controls">
                        <input type="text" id="username" name="username" placeholder="登陆名"
                               class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">登陆密码：</label>
                    <div class="controls">
                        <input type="text" id="password" name="password" placeholder="登陆密码"
                               class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">店铺名称：</label>
                    <div class="controls">
                        <input type="text" id="nickName" name="nickName" placeholder="店铺名称"
                               class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">公司名称：</label>
                    <div class="controls">
                        <input type="text" id="name" name="name" placeholder="公司名称" class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">公司邮箱：</label>
                    <div class="controls">
                        <input type="text" id="email" name="email" placeholder="公司邮箱" class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">公司手机：</label>
                    <div class="controls">
                        <input type="text" id="mobile" name="mobile" placeholder="公司手机" class="input-xfat input-xlarge">
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">公司电话：</label>
                    <div class="controls">
                        <input type="text" id="telephone" name="telephone" placeholder="公司电话"
                               class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">公司详细地址：</label>
                    <div class="controls">
                        <input type="text" id="addressDetail" name="addressDetail" placeholder="公司详细地址"
                               class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">联系人姓名：</label>
                    <div class="controls">
                        <input type="text" id="linkmanName" name="linkmanName" placeholder="联系人姓名"
                               class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">联系人QQ：</label>
                    <div class="controls">
                        <input type="text" id="linkmanQq" name="linkmanQq" placeholder="联系人QQ"
                               class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">联系人手机：</label>
                    <div class="controls">
                        <input type="text" id="linkmanMobile" name="linkmanMobile" placeholder="联系人手机"
                               class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">联系人EMAIL：</label>
                    <div class="controls">
                        <input type="text" id="linkmanEmail" name="linkmanEmail" placeholder="联系人EMAIL"
                               class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">营业执照号：</label>
                    <div class="controls">
                        <input type="text" id="licenseNumber" name="licenseNumber" placeholder="营业执照号"
                               class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">税务登记证号：</label>
                    <div class="controls">
                        <input type="text" id="taxNumber" name="taxNumber" placeholder="税务登记证号" class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">组织机构代码证：</label>
                    <div class="controls">
                        <input type="text" id="orgNumber" name="orgNumber" placeholder="组织机构代码证" class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">法定代表人：</label>
                    <div class="controls">
                        <input type="text" name="legalPerson" id="legalPerson" placeholder="法定代表人" class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">法定代表人身份证号：</label>
                    <div class="controls">
                        <input type="text" name="legalPersonCardId" id="legalPersonCardId" placeholder="法定代表人身份证号" class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">开户行名称：</label>
                    <div class="controls">
                        <input type="text" name="bankUser" id="bankUser"  placeholder="开户行名称" class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">开户行支行：</label>
                    <div class="controls">
                        <input type="text" name="bankName" id="bankName" placeholder="开户行支行" class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">银行账号：</label>
                    <div class="controls">
                        <input type="text" id="logoPic" name="logoPic" placeholder="银行账号" class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">公司简介：</label>
                    <div class="controls">
                        <input type="text" id="brief" name="brief" placeholder="公司简介" class="input-xfat input-xlarge">
                    </div>
                </div>

                <div class="control-group">
                    <label for="inputPassword" class="control-label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
                    <div class="controls">
                        <input name="m1" type="checkbox" value="2" checked=""><span>同意协议并注册  <a href="">《瓷器商城入驻协议》</a></span>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label"></label>
                    <div class="controls btn-reg">
                        <a class="sui-btn btn-block btn-xlarge btn-danger" onclick="registerSettle()">申请入驻</a>
                    </div>
                </div>
            </form>
            <div class="clearfix"></div>
        </div>
    </div>
    <!--foot-->
    <div class="py-container copyright">
        <ul>
            <li>关于我们</li>
            <li>联系我们</li>
            <li>联系客服</li>
            <li>商家入驻</li>
        </ul>
        <div class="address">地址：地球中国河北省大连市他旮旯村儿 邮编：100000 电话：400-400-4000 传真：010-11111111</div>
        <div class="beian">ICP备--------号网安备ABCABCABC
        </div>
    </div>
</div>


<script type="text/javascript" src="${ctx}/js/plugins/jquery/jquery.min.js"></script>
<script type="text/javascript" src="${ctx}/js/plugins/jquery.easing/jquery.easing.min.js"></script>
<script type="text/javascript" src="${ctx}/js/plugins/sui/sui.min.js"></script>
<script type="text/javascript" src="${ctx}/js/plugins/jquery-placeholder/jquery.placeholder.min.js"></script>
<script type="text/javascript" src="${ctx}/js/pages/register.js"></script>
<script>
    //判断是否为空
    function isBlank(value) {
        return !value || !/\S/.test(value)
    }

    function registerSettle() {
        var form = $('#settelForm').serialize();
        console.log(form);
        $.ajax({
                url: "${ctx}/register/settle",
                type: 'post',
                data: $('#settelForm').serialize(),
                success: function (response) {
                    console.log(response);
                    if (response.success) {
                        alert(response.message);
                        window.location.href = 'http://localhost:8080/admin/login.html';
                    } else {
                        alert(response.message);
                    }
                }
            }
        );
    }
</script>
</body>

</html>